package com.healthy.reminders.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.healthy.reminders.mapper.UserAchievementsMapper;
import com.healthy.reminders.domain.UserAchievements;
import com.healthy.reminders.service.IUserAchievementsService;

/**
 * 获得成就Service业务层处理
 * 
 * @author 束伟
 * @date 2024-03-29
 */
@Service
public class UserAchievementsServiceImpl implements IUserAchievementsService 
{
    @Autowired
    private UserAchievementsMapper userAchievementsMapper;

    /**
     * 查询获得成就
     * 
     * @param id 获得成就主键
     * @return 获得成就
     */
    @Override
    public UserAchievements selectUserAchievementsById(Long id)
    {
        return userAchievementsMapper.selectUserAchievementsById(id);
    }

    /**
     * 查询获得成就列表
     * 
     * @param userAchievements 获得成就
     * @return 获得成就
     */
    @Override
    public List<UserAchievements> selectUserAchievementsList(UserAchievements userAchievements)
    {
        return userAchievementsMapper.selectUserAchievementsList(userAchievements);
    }

    /**
     * 新增获得成就
     * 
     * @param userAchievements 获得成就
     * @return 结果
     */
    @Override
    public int insertUserAchievements(UserAchievements userAchievements)
    {
        return userAchievementsMapper.insertUserAchievements(userAchievements);
    }

    /**
     * 修改获得成就
     * 
     * @param userAchievements 获得成就
     * @return 结果
     */
    @Override
    public int updateUserAchievements(UserAchievements userAchievements)
    {
        return userAchievementsMapper.updateUserAchievements(userAchievements);
    }

    /**
     * 批量删除获得成就
     * 
     * @param ids 需要删除的获得成就主键
     * @return 结果
     */
    @Override
    public int deleteUserAchievementsByIds(Long[] ids)
    {
        return userAchievementsMapper.deleteUserAchievementsByIds(ids);
    }

    /**
     * 删除获得成就信息
     * 
     * @param id 获得成就主键
     * @return 结果
     */
    @Override
    public int deleteUserAchievementsById(Long id)
    {
        return userAchievementsMapper.deleteUserAchievementsById(id);
    }
}
